package adapter.springmvc;

import java.text.SimpleDateFormat;

public interface HandleAdapter {

    boolean supports(Object handle);

    void handle(Object handle);

}

class SimpleHandleAdapter implements HandleAdapter{

    public boolean supports(Object handle) {
        return (handle instanceof SimpleController);
    }

    public void handle(Object handle) {
        ((SimpleController)handle).doSimpleController();

    }
}
class HttpHandleAdapter implements HandleAdapter{

    public boolean supports(Object handle) {
        return (handle instanceof HttpController);
    }

    public void handle(Object handle) {
        ((HttpController)handle).doHttpController();

    }
}
class AnnotationHandleAdapter implements HandleAdapter{

    public boolean supports(Object handle) {
        return (handle instanceof AnnotationController);
    }

    public void handle(Object handle) {
        ((AnnotationController)handle).doAnnotationController();

    }
}